package com.example.combwx.mvp.view;

import android.graphics.Color;
import android.view.View;
import android.widget.LinearLayout;

import androidx.fragment.app.FragmentTransaction;

import com.example.combwx.R;
import com.example.combwx.mvp.base.view.BaseActivity;
import com.example.combwx.mvp.contract.FrameContract;
import com.example.combwx.mvp.di.DaggerFrameComponent;
import com.example.combwx.mvp.di.FrameModules;
import com.example.combwx.mvp.presenter.FramePresenter;
import com.example.combwx.mvp.view.uesr.UserFragment;
import com.example.combwx.widget.BottomButton;

import java.util.Map;

public class FrameActivity extends
        BaseActivity<FramePresenter>
        implements FrameContract.IFrameView, BottomButton.SelectListener {
    private UserFragment userFragment;
    private android.widget.LinearLayout frameLinear;
    private android.widget.LinearLayout fameLinear;

    @Override
    public View addStatusView() {
        return f(R.id.frame_linear);
    }

    @Override
    public int addcolor() {
        return Color.WHITE;
    }

    @Override
    public int bindLayout() {
        return R.layout.activity_main;
    }

    @Override
    public void initView() {
        frameLinear = (LinearLayout) f(R.id.frame_linear);
        fameLinear = (LinearLayout) f(R.id.fame_linear);
      userFragment =  new UserFragment();
        FragmentTransaction fragmentTransaction = getSupportFragmentManager().beginTransaction();
        fragmentTransaction.add(R.id.fame_linear,userFragment);
        fragmentTransaction.commit();

    }

    @Override
    public void initData() {

    }

    @Override
    public void inject() {
        DaggerFrameComponent.builder().frameModules(new FrameModules(this)).build().inject(this);
    }

    @Override
    public void refresh(Map<String, Object> resultMap) {

    }

    @Override
    public void onSelect(int id) {

    }
}
